package com.cskaoyan.java._1handle._4finally;

/**
 * finally代码块语法的变形
 * 当不希望捕获异常,但又必须需要执行一段代码时,可以考虑以下格式:
 * try{
 *
 * }finally{
 *
 * }
 * @since 17:21
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo2 {
    public static void main(String[] args) {
        test();
    }

    public static void test() {
        try {
            throw new RuntimeException("抛出去玩!");
        } finally {
            System.out.println("我就是要执行!");
        }
    }
}
